module.exports = {
  publicPath: "../apps/com.awspaas.user.apps.bono.portal/dist",
  publicPath:"./",
  outputDir: 'dist',
  // 关闭线上源码
  productionSourceMap: false,
  devServer: {
    proxy: {
      "/api": {
        // target: "http://10.213.120.206",
        target: "http://192.168.20.98:8080",

        changeOrigin: true, // 是否允许跨越, 开发环境中使用
        pathRewrite: {
          "^/api": ""
        }
      },
      '/portal': {
        target: "http://192.168.20.98:8080",

      },

    }
  },
  chainWebpack: (config) => {
    const svgRule = config.module.rule('svg');

    svgRule.uses.clear();

    svgRule
      .use('babel-loader')
      .loader('babel-loader')
      .end()
      .use('vue-svg-loader')
      .loader('vue-svg-loader');
  },
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === 'production') {// 为生产环境修改配置...
      config.mode = 'production';
      config["performance"] = {//打包文件大小配置
        "maxEntrypointSize": 10000000,
        "maxAssetSize": 30000000
      }
    }
  }
}